{{/* A hack to check for the presence of a TOC */}}
{{ $hasToc := gt (len .TableOfContents) 32 }}
{{ $isComponent := in (slice "component" "integrate") .Layout }}
{{ $showToc := .Params.show_toc }}
{{ if or $hasToc $isComponent $showToc }}
<div class="pb-16">
  <p class="uppercase font-semibold text-md dark:text-gray-200 text-gray-600 mb-3">
    On this page
  </p>

  {{/* This div is auto-populated by Tocbot */}}
  <div id="toc"></div>
</div>
{{ end }}